import {request} from '@/utils/request'
//业务模型类-列表 参数  content pageIndex  pageSize 
export function workplanclassquery(param) {  
  return request({
    url: '/workplanclass/query',
    method: 'post',    
    data: param
  })
}

// 保存 id name code state note ord
export function workplanclasssave(param) {
  return request({
    url: '/workplanclass/save',
    method: 'post',
    data: param,
    type: 2
  })
}

//业务模型类-详情 参数 id   返回 "id": 4,"code": "编码","name": "业务模型","note": "业务描述","ord": 1,"state": true
export function workplanclassdetail(param) {
  return request({
    url: '/workplanclass/detail',
    method: 'post',
    data: param
  })
}

//业务模型类-删除 参数 id
export function workplanclassdelete(param) {
  return request({
    url: '/workplanclass/delete',
    method: 'post',
    data: param
  })
}

//流程-版本列表 参数 classId
export function workplanversion(param) {
  return request({
    url: '/workplan/version',
    method: 'post',
    data: param
  })
}

//流程-详情 参数  流程 id  流程类 classId
export function workplandetail(param) {
  return request({
    url: '/workplan/detail',
    method: 'post',
    data: param
  })
}

//流程-保存 {classId,code,active,version,node:[code,runType],edge:[code,fnodeCode,tnodeCode]}
export function workplansave(param) {
  return request({
    url: '/workplan/save',
    method: 'post',
    data: param,
    type: 2
  })
}

//流程-设置活动版本（参数 id 
export function workplanctive(param) {
  return request({
    url: '/workplan/active',
    method: 'post',
    data: param
  })
}

//流程-删除 参数 id  start 返回 msg success
export function workplandelete(param) {
  return request({
    url: '/workplan/delete',
    method: 'post',
    data: param
  })
}